package com.xzr.controller;

import com.xzr.Service.RbacManagerService;
import com.xzr.entity.RbacManager;
import com.xzr.utils.ResultData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

/**
 * @Author：jojo
 * @Date：2022/2/21 15:35
 * @Description :TODO
 */
@RestController
@RequestMapping("/rbacManager")
public class RbacManagerController {
    @Autowired(required = false)
    RbacManagerService rbacManagerService;
    @RequestMapping("/findAll/{currentPage}/{pageSize}")
    public ResultData findALL(@PathVariable("currentPage") int currentPage,@PathVariable("pageSize") int pageSize,@RequestBody RbacManager rbacManager){
        return rbacManagerService.findAll(currentPage,pageSize,rbacManager);
    }
    @RequestMapping("/deletOne/{id}")
    public ResultData deletOne(@PathVariable int id){
        return rbacManagerService.deletOne(id);
    }
    @RequestMapping("/addOne")
    public ResultData addOne(@RequestBody RbacManager rbacManager){
        return rbacManagerService.addOne(rbacManager);
    }
    @RequestMapping("/updataOne")
    public ResultData updataOne(@RequestBody RbacManager rbacManager){
        return rbacManagerService.updataOne(rbacManager);
    }

}
